home *** CD-ROM | disk | FTP | other *** search
- # Login.cmd for NSTN/iStar Communications
- #
- #
- echo on
- trace off
- load $username
- load $number
- load $init
- $inline = "nothing"
- %TIMEOUT = 0
- $RESULT = 0
-
- display Status: Commencing Login Procedure\n
-
- if %ppp = 0
- $type = "SLIP"
- else
- $type = "PPP"
- end
-
- #display Status: Hanging up Modem\n
- sleep 2
- output +++
- sleep 2
- display "Status: Initializing Modem"
- output ATH0\r
- if [input 10 OK] = 0
- abort
- end
- display "..."
- output ATE1Q0V1\r
- if [input 10 OK] = 0
- abort
- end
- display "..."\n
- output AT$init\r
- if [input 10 OK] = 0
- abort
- end
- display Status: Dialling...\n
- $RESULT = "RINGING"
-
- %ATTEMPTS = 0
- %connect = 0
- repeat
- %doneloop = 0
- %ATTEMPTS = %ATTEMPTS + 1
- OUTPUTECHO 60 AT$NUMBER\r
- repeat
- %TIMEOUT = [ READ 30 $RESULT ]
- $myres = copy($RESULT,1,4)
- if $myres = "CONN"
- %doneloop = 1
- %connect = 1
- end
- if $myres = "NO C"
- %doneloop = 1
- %connect = 0
- end
- if $myres = "BUSY"
- %doneloop = 1
- %connect = 0
- end
- if $myres = "RING"
- %doneloop = 0
- %conne
- ct = 0
- end
- if $myres = "NO D"
- %doneloop = 1
- %connect = 0
- end
- # display got $RESULT with %doneloop %connect\n
- until %doneloop = 1
- sleep 2
- UNTIL %connect = 1
-
- display "Status: Connecting"
- repeat # keep prodding server till it wakes up
- output \r
- display "... "
- until [input 5 name:]
- display \n
-
- repeat # get a good username/password
- username Please enter your username
- output \u\r
- input 30 word:
- password Please enter your password
- output \p\r
- until [input 5 name:] = 0
-
- if $type = "SLIP"
- output slip default\n
- input 30 Your
- address 30
- input 30 \n
- display \n
- display Status: Starting SLIP. Your IP address is \i.\n
- else
- display Status: Starting PPP.\n
- output ppp default\n
- end
-
- display YOU ARE NOW CONNECTED. PLEASE MINIMIZE THIS WINDOW TO CONTINUE.\n
-